/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is Forte for Java, Community Edition. The Initial * Developer of the Original Code is Sun Microsystems, Inc. Portions * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.debugger.jpda; import org.openide.util.NbBundle; /** * * @author Jan Jancura */ public class VariableBreakpointPanel extends javax.swing.JPanel { static final long serialVersionUID = -2304154922973564197L; private VariableBreakpoint event; /** Creates new form VariableBreakpointPanel */ public VariableBreakpointPanel (VariableBreakpoint e) { initComponents (); event = e; jTextField3.setText (e.getClassName ()); jTextField4.setText (e.getFieldName ()); jComboBox2.addItem (NbBundle.getBundle (VariableBreakpointPanel.class). getString ("CTL_Variable_access")); jComboBox2.addItem (NbBundle.getBundle (VariableBreakpointPanel.class). getString ("CTL_Variable_modification")); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the FormEditor. */ private void initComponents () {//GEN-BEGIN:initComponents jLabel1 = new javax.swing.JLabel (); jTextField3 = new javax.swing.JTextField (); jLabel5 = new javax.swing.JLabel (); jTextField4 = new javax.swing.JTextField (); jLabel6 = new javax.swing.JLabel (); jComboBox2 = new javax.swing.JComboBox (); jPanel5 = new javax.swing.JPanel (); setLayout (new java.awt.GridBagLayout ()); java.awt.GridBagConstraints gridBagConstraints1; jLabel1.setText (NbBundle.getBundle (VariableBreakpointPanel.class).getString ("CTL_Variable_class_name")); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 0; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add (jLabel1, gridBagConstraints1); jTextField3.setColumns (25); jTextField3.addFocusListener (new java.awt.event.FocusAdapter () { public void focusLost (java.awt.event.FocusEvent evt) { jTextField2FocusLost (evt); } } ); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 0; gridBagConstraints1.gridwidth = 0; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints1.weightx = 1.0; add (jTextField3, gridBagConstraints1); jLabel5.setText (NbBundle.getBundle (VariableBreakpointPanel.class).getString ("CTL_Variable_field_name")); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 1; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add (jLabel5, gridBagConstraints1); jTextField4.setColumns (25); jTextField4.addFocusListener (new java.awt.event.FocusAdapter () { public void focusLost (java.awt.event.FocusEvent evt) { jTextField1FocusLost (evt); } } ); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 1; gridBagConstraints1.gridwidth = 0; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints1.weightx = 1.0; add (jTextField4, gridBagConstraints1); jLabel6.setText (NbBundle.getBundle (VariableBreakpointPanel.class).getString ("CTL_Variable_stop_on")); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 2; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add (jLabel6, gridBagConstraints1); jComboBox2.addActionListener (new java.awt.event.ActionListener () { public void actionPerformed (java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed (evt); } } ); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 2; gridBagConstraints1.insets = new java.awt.Insets (2, 2, 2, 2); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add (jComboBox2, gridBagConstraints1); gridBagConstraints1 = new java.awt.GridBagConstraints (); gridBagConstraints1.gridx = 3; gridBagConstraints1.gridy = 3; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.weighty = 1.0; add (jPanel5, gridBagConstraints1); }//GEN-END:initComponents private void jTextField2FocusLost (java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField2FocusLost // Add your handling code here: event.setClassName (jTextField3.getText ()); }//GEN-LAST:event_jTextField2FocusLost private void jComboBox1ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed // Add your handling code here: event.setType (jComboBox2.getSelectedIndex ()); }//GEN-LAST:event_jComboBox1ActionPerformed private void jTextField1FocusLost (java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost // Add your handling code here: event.setFieldName (jTextField4.getText ()); }//GEN-LAST:event_jTextField1FocusLost // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; private javax.swing.JTextField jTextField3; private javax.swing.JLabel jLabel5; private javax.swing.JTextField jTextField4; private javax.swing.JLabel jLabel6; private javax.swing.JComboBox jComboBox2; private javax.swing.JPanel jPanel5; // End of variables declaration//GEN-END:variables } /* * Log * 3 Gandalf 1.2 11/5/99 Jan Jancura Add Breakpoint Dialog * design updated * 2 Gandalf 1.1 10/23/99 Ian Formanek NO SEMANTIC CHANGE - Sun * Microsystems Copyright in File Comment * 1 Gandalf 1.0 9/28/99 Jan Jancura * $ */